//
//  CShareMgr.h
//  WZEfengAndEtong
//
//  Created by wanzhao on 16/3/1.
//  Copyright © 2016年 wanzhao. All rights reserved.
//

//默认的shareid为空时是网络未加载成功
#import <Foundation/Foundation.h>
@class EFengShare;

@interface CShareMgr : NSObject

- (BOOL)insertWithShare:(EFengShare *)share;
- (BOOL)batchInsertWithShareList:(NSArray *)shareList;
- (BOOL)updateWithShare:(EFengShare *)share;
- (BOOL)batchUpdateWithShareList:(NSArray *)shareList;
- (NSInteger)getShareAllUnReadCount;
- (NSInteger)getAttentionShareAllUnReadCount;
//- (NSArray *)getNewestShareData;
//加载最新的20条分享
- (NSArray *)getNewerShareWithMaxTimeStamp:(NSString *)timeStamp;
//加载之前的20条分享
- (NSArray *)getOlderShareWithMinTimeStamp:(NSString *)timeStamp;


- (NSArray *)getAttentionNewerShareWithMaxTimeStamp:(NSString *)timeStap curUserId:(NSString *)curUserId;
//加载之前的20条分享
- (NSArray *)getAttentionOlderShareWithMinTimeStamp:(NSString *)timeStamp curUserId:(NSString *)curUserId;
//- (NSArray *)getAttentionNewestShareDataWithCurUserId:(NSString *)curUserId;

- (BOOL)delShareWithShareId:(NSString *)shareId;
- (BOOL)updateZanWithShareId:(NSString *)shareId isZan:(BOOL)isZan;
//获取所有发送失败的分享
- (NSArray *)getAllUnsendShare;
- (NSString *)getMaxDateShare;
- (EFengShare *)getShareWithShareIndex:(NSInteger)shareIndex;
- (BOOL)delShareWithShareIndex:(NSInteger)shareIndex;
- (NSArray *)getUnSendShare;
- (BOOL)updateShareIsUnNetCompletedWithShare:(EFengShare *)share isDel:(BOOL)isDel;
- (NSArray *)getShareListWithSenderUserId:(NSString *)sendUserId;
////加载最新的20条分享
//- (NSArray *)getNewerShareWithMinShareIndex:(NSInteger)shareIndex releaseUserId:(NSString *)releaseUserId;
////加载之前的20条分享
//- (NSArray *)getOlderShareWithMaxShareIndex:(NSInteger)shareIndex releaseUserId:(NSString *)releaseUserId;

//获取我关注的人的分享列表
- (NSArray *)getMineAttentionShareList;
- (EFengShare *)getShareWithShareId:(NSString *)shareId;
- (EFengShare *)getMaxShareIndexShare;
- (NSString *)getMinDateShare;
- (BOOL)updateAllUnreadShareToReadShare;
- (BOOL)batchUpdateAllUnreadShareToReadShareWithShareList:(NSArray *)shareList;
- (BOOL)updateShareWithShareId:(NSString *)shareId date:(NSString *)date;
- (NSString *)getShareContentWithShareId:(NSString *)shareId;
- (NSArray *)getShareImageNameWithShareId:(NSString *)shareId;
@end
